

import plotting.*;

Figure fig;

void setup()  {  
  size(520, 320);
  fig=new Figure(this,new Rectangle(60,60,400,200));
  fig.autoScaleX=true;
  fig.autoScaleY=true;
  fig.update();
}

void draw() {

  double[] y=new double[40];
  for (int j=0;j<40;j++) y[j]=random(0.0,1.0)*10+40;
  noFill();
  background(0);
  fig.draw();
  fig.plot(y,Figure.Approx.nearest);
  delay(1000);
}


